home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / GRAPHICS.SWG / 0144_Programming Mode $12 Graphics.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  841b  |  28 lines

  1. {
  2. > I need help programming in Mode 12h.  That's 640x480x16.  I need help
  3. > changing the bit planes, and also I need help with an explanation of the
  4. > bit plane arrangement.  Any help would be appreciated.  I don't mind (if
  5. > you write a routine for me ) if its in Assembler or Pascal. Thanks!
  6.  
  7. I was fiddling with this this afternoon, origonally from Mr Michael Field, in
  8. NZ_LOWLEVEL, I got the following (now pascal) routines:
  9. }
  10.  
  11. Procedure SetWriteMode; {Called once at start of program.}
  12. Begin
  13.  Port[$3CE]:=5;
  14.  Port[$3CF]:=Port[$3CF] And $FC;
  15. End;
  16.  
  17. Procedure Plot(X,Y:Word; C:Byte);
  18. Var
  19.  B:Byte;
  20. Begin
  21.  PortW[$3CE]:=(C Mod 16)*256;
  22.  PortW[$3CE]:=$0F01;
  23.  Port[$3CE]:=8;
  24.  Port[$3CF]:=128 Shr (X And 7);
  25.  B:=Mem[$A000:(X Shr 3)+80*Y];   {This is important. Dont ask me why.}
  26.  Mem[$A000:(X Shr 3)+80*Y]:=$FF;
  27. End;
  28.